package chapter06.md.E14;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;

public class E14 {
    public static void main(String[] args) {
        HashMap map = new HashMap();
        map.put("200304010601", "蔡徐坤");
        map.put("202304010601","马嘉祺");
        map.put("202304010602","宋亚轩");
        System.out.println(map);
        //取出Key值队列 用来迭代
        Set ks = map.keySet();
        Iterator it = ks.iterator();
        while (it.hasNext()) {
            Object obj = it.next();
            System.out.println(obj);
            System.out.println("学号" + obj+ ": " +map.get(obj));
        }
    }
}
